
import java.util.GregorianCalendar;
import java.util.Random;
public class HiloTiraDado extends Thread {

	private int numero;
	
	public HiloTiraDado(String name) {
		super(name);

	}
	public void run(){
		
		//Forma 1 de sacar un ramdom entero
		//GregorianCalendar calendario = new GregorianCalendar(); 
		//Random a= new Random(calendario.getTimeInMillis());
		
		//Forma2 de sacar un ramdom entero
		//Random a= new Random(System.currentTimeMillis());
		//this.numero= a.nextInt(6)+1;
		
		//Forma 3 de sacar numero aleatorio
		this.numero= (int) (Math.random()*6+1);
		
	}
	
	public int getNumero(){
		return numero;
	}
}
